#!/bin/bash

# traverse the whole corpus directory, find the corresponding mode.assign file and sentence_segment
# file, and then, invoke the assign.py corresspondingly.

# Usaga: ./assign.sh topics_dir output_dir
# the topics_dir must contain the preprocess files sentence_segment.temp or RemoveStop.temp or 
# stopwords.temp file, and the hlda result file must contain the run directory and mode.assign in it.
# @Date Thu May 23, 2013
# @Author lengerfulluse@gmail.com
# Under the General Public License (GPL 2.0)


if [ ! -d $1 ];
then
    echo "$1 is not a validate directory please check it !"
    exit 1
elif [ ! -d $2 ];
then
    echo "$2 directory seems doesn't exist, create it for you..."
    mkdir -p $2
